home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 276-300 / disk_280 / graph / list.c < prev    next >
C/C++ Source or Header  |  1992-05-06  |  508b  |  25 lines

  1. /*
  2.  *                 GRAPH, Version 1.00 - 4 August 1989
  3.  *
  4.  *            Copyright 1989, David Gay. All Rights Reserved.
  5.  *            This software is freely redistrubatable.
  6.  */
  7.  
  8. #include <exec/types.h>
  9. #include <stddef.h>
  10. #include "list.h"
  11. #include "tracker.h"
  12.  
  13. /* Free all elements in list (each of size size) */
  14. void free_list(list *l, size_t size)
  15. {
  16.     node *scan, *next;
  17.  
  18.     for (scan = first(l); next = succ(scan); scan = next)
  19.         FreeMem(scan, size);
  20.  
  21.     /* Be safe */
  22.     new_list(l);
  23. }
  24.  
  25.